//
//  AdvertisingManagement.h
//  DLMovies
//
//  Created by mac1012 on 2017/2/16.
//  Copyright © 2017年 DianlE. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <InMobiSDK/InMobiSDK.h>

@interface AdvertisingManager : NSObject

typedef enum : NSUInteger {
    Banner,
    Interstitial,
} AdvertisingType;

typedef void(^closeBlock)();
typedef void(^bannerBlock)(IMBanner *banner);

+ (instancetype)shareAdvertisingManager;

@property (nonatomic) closeBlock closeBanBlock;
@property (nonatomic) closeBlock closePopBlock;

- (void)manager;
- (BOOL)isShowAdvertising;

- (void)initBanner:(CGRect )frame WithBlock:(bannerBlock)block;
- (void)showPop:(UIViewController *)viewController WithType:(AdvertisingType)type WithCloseBlock:(closeBlock)block;

- (void)loadInterstitial;
- (void)loadNative;
- (void)recyclePrimaryView;

- (void)bindNative:(BOOL)isBind WithCell:(UITableViewCell *)cell;
- (void)nactiveReportAdClick;

- (void)closeAdvertisingPop;

@property (nonatomic, strong) IMInterstitial *interstitial;
@property (nonatomic, strong) IMNative* native;
@property (nonatomic, strong) IMBanner *banner;
@property (nonatomic, strong) NSMutableArray *bannerArr;
@end
